home *** CD-ROM | disk | FTP | other *** search
/ Total Web Page (Professional Suite) / Total Web Page 99.iso / CGI / DOWNLOAD.CGI-S=ANIMATION&C=TXT&F=README < prev    next >
Text File  |  1996-06-03  |  8KB  |  165 lines

  1. ##############################################################################
  2. # Animation                     Version 1.2                                  #
  3. # Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
  4. # Created 9/28/95               Last Modified 11/21/95                       #
  5. # Scripts Archive at:           http://www.worldwidemart.com/scripts/        #
  6. ##############################################################################
  7. # If you run into any problems while trying to configure this scripts, help
  8. # is available.  The steps you should take to get the fastest results, are:
  9. #    1) Read this file thoroughly
  10. #    2) Consult the Matt's Script Archive Frequently Asked Questions:
  11. #        http://www.worldwidemart.com/scripts/faq/
  12. #    3) If you are still having difficulty installing this script, send
  13. #       e-mail to: scripts-help@tahoenet.com
  14. #       Include any error messages you are receiving and as much detail
  15. #       as you can so we can spot your problem.  Also include the variable
  16. #       configuration block that is located at the top of the script.
  17. #
  18. # Hopefully we will be able to help you solve your problems.  Thank you.
  19. ##############################################################################
  20. # COPYRIGHT NOTICE                                                           #
  21. # Copyright 1996 Matthew M. Wright  All Rights Reserved.                     #
  22. #                                                                            #
  23. # Animation may be used and modified free of charge by anyone so long as     #
  24. # this copyright notice and the comments above remain intact.  By using this #
  25. # code you agree to indemnify Matthew M. Wright from any liability that      #  
  26. # might arise from it's use.                                                 #  
  27. #                                                                            #
  28. # Selling the code for this program without prior written consent is         #
  29. # expressly forbidden.  In other words, please ask first before you try and  #
  30. # make money off of my program.                                              #
  31. #                                                                            #
  32. # Obtain permission before redistributing this software over the Internet or #
  33. # in any other medium.    In all cases copyright and header must remain intact #
  34. ##############################################################################
  35.  
  36. This script allows you to implement animations in-lined into your HTML pages.  
  37. It uses the idea of server push, where images are pushed down by the server to 
  38. the client one after the other, which creates the look of an animation.  There 
  39. is not much to this script and it should not be hard to install onto your 
  40. system.  You will need to have Perl installed on your system and have access 
  41. to execute CGI scripts either through a cgi-bin or a .cgi extension.  Check 
  42. with your system administrator to see if they allows either of these.
  43.  
  44. There are two files included with this script:
  45.         1) README - This file; includes detailed installation instructions.
  46.         2) nph-anim.pl - The Perl script which generates the headers and 
  47.                           pushes your images to the client.
  48.  
  49. The only file that needs to be edited for this script to work is the 
  50. nph-anim.pl script.  Below is a set of instructions for setting it up 
  51. on your system.
  52.  
  53. NPH-ANIM.PL -
  54.  
  55.         There are three variables that must be set in this script for it to 
  56. work correctly:
  57.  
  58. $times = "1";
  59.  
  60.         This is the number of times you want the script to cycle through your 
  61. entire animation.  Most of the time this will be set to "1", but you may wish 
  62. for it to loop several times.
  63.  
  64. $basefile = "/path/to/images/";
  65.  
  66.         This is the base filename where all of your images are kept.  When the 
  67. script chooses the images, the filenames from @files are appended to this to 
  68. form a complete path to the image.  Realize that this path must be an absolute 
  69. path on the system and should not be relative to the WWW pages.
  70.  
  71. @files = ("begin.gif","second.gif","third.gif","last.gif");
  72.  
  73.         These are the filenames, put into an array separated by commas, that 
  74. will be appended to $basefile.  Put the images in the order that you want the 
  75. animation sequence to run, with the first image as the first element of the 
  76. array and the last image of the animation as your last element of the array.
  77.  
  78. $con_type = "gif";
  79.  
  80.     This should be set to the type of image you are planning on 
  81. sending to the browser.  Values can be one of the following:
  82.        VALUE           IMAGE EXTENSION
  83.     gif                      gif
  84.     jpeg                     jpeg jpg jpe
  85.     ief                      ief
  86.     tiff                     tiff tif
  87.     x-cmu-raster             ras
  88.     x-portable-anymap        pnm
  89.     x-portable-bitmap        pbm
  90.     x-portable-graymap       pgm
  91.     x-portable-pixmap        ppm
  92.     x-rgb                    rgb
  93.     x-xbitmap                xbm
  94.     x-xpixmap                xpm
  95.     x-xwindowdump            xwd
  96.  
  97. For instance, if you want to use a jpg image, you would put in 'jpeg' for 
  98. this variable.  Use the values on the right in this variable, and you can 
  99. identify the proper values by looking at the extension on your image and 
  100. then looking for it in the right column and trace it over to the value in 
  101. the left.  Keep in mind that not all of the values will display in all 
  102. browsers.
  103.  
  104. _____________________________________________________________
  105.  
  106. Calling your animation from your HTML file.
  107.  
  108. Calling this animation script is as easy as in-lining an image.  If your 
  109. animation script is located at the url:
  110.  
  111. http://your.host.xxx/cgi-bin/nph-anim.pl
  112.  
  113. Then you would call the animation simply by doing:
  114.  
  115. <img src="http://your.host.xxx/cgi-bin/nph-anim.pl">
  116.  
  117. Any other attribute to the image or animation can be added as normal, such as 
  118. align, border, alt, etc... so that it would look like:
  119.  
  120. <img src="http://your.host.xxx/cgi-bin/nph-anim.pl" align=left border=0 
  121.          alt="Animation!">
  122. ___________________________________________________________________________
  123.  
  124. FAQ:
  125.  
  126. Can I change the name of nph-anim.pl?  Why does it have nph- in front of it?
  127.  
  128. Good question.  If you change the name of the script from nph-anim.pl to 
  129. something without nph- on the front of it, you will need to comment out 
  130. the line:
  131.  
  132. print "HTTP/1.0 200 OK\n";
  133.  
  134. The nph- means non-parsed header file, which makes the server execute it 
  135. instead of parsing the script.
  136.  
  137. You may also want to try commenting out the line if the script is giving 
  138. you problems.
  139. _________________________________________________________________________
  140. HISTORY
  141.    Version 1.0    - 9/18/95    - First Version Released
  142.    Version 1.1  - 11/4/95    - Version 1.1 Released with a minor fix 
  143.                   explaining the nph- and header outputs.
  144.    Version 1.2  - 11/21/95    - A small fix, suggested by Robert Wood 
  145.                   <wood@nexen.com> helped improve the 
  146.                   buffering of the output of the images.
  147. _________________________________________________________________________
  148.  
  149. This script is provided as is and comes with no warranties, expressed or 
  150. implied.  It was written to be useful and fun, so by all means, enjoy it!  You 
  151. have permission to edit/modify/whatever this script and I ask only two things 
  152. in return:
  153.  
  154. 1) If you implement it on a page, please let me know the URL of where it is 
  155.    implemented so I can see my work
  156.  
  157. and
  158.  
  159. 2) Please keep my name and url in the script itself somewhere, and if you 
  160. would like you could even add it to your page, but that is not necessary.
  161.  
  162. If you have any questions, let me know and I will try and help!
  163. ____________________________________________________________________________
  164. Matt Wright - mattw@worldwidemart.com  http://www.worldwidemart.com/scripts/
  165.